package com.lonely.web.controller.order;

import com.lonely.common.core.domain.api.R;
import com.lonely.order.service.IOrderTagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 黄志标
 * @date: 2025/6/23 16:34
 * @description: 订单标签请求处理器
 */
@RestController
@RequestMapping("/orderManager/orderTag")
@Api(tags = "订单管理/标签")
public class OrderTagController {

    @Autowired
    private IOrderTagService orderTagService;

    /**
     * 根据订单号查询订单标签
     *
     * @param produceOrderId
     * @return
     */
    @GetMapping("/getOrderTagIdsByProduceOrderId/{produceOrderId}")
    @ApiOperation(value = "根据订单号查询订单标签")
    public R<List<String>> getOrderTagIdsByProduceOrderId(@PathVariable("produceOrderId") Long produceOrderId) {
        return R.data(this.orderTagService.getOrderTagIdsByProduceOrderId(produceOrderId));
    }
}
